package org.stwy.bills.water;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.stwy.custom.CustomEntity;
import org.stwy.pro.asset.AssetEntity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.rap.common.annotation.MetaData;
import com.rap.common.entity.AuditableEntity;
import com.rap.common.entity.BaseEntity;

/**
*版权信息 (c) RAP 保留所有权利.
*@author Rap.Codegen
*@Team RAP Team
*@Date 2015-4-25 12:30:50
*<p></p>
*
*@参与人：Rap.Codegen
*/
 
@MetaData(value = "水电费")
@Entity
@Table(name = "stwy_waterbills")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class WaterBillsEntity extends BaseEntity {
	private static final long serialVersionUID = 1L;
	@MetaData(value = "年月",comments="" )
	@Column(nullable = false,length=10)
	private String yearMonth;
	
	@MetaData(value = "客户名称",comments="" )
	@ManyToOne
	@JoinColumn(name = "customId")
	private CustomEntity custom;
	
	@MetaData(value = "资产名称",comments="" )
	@ManyToOne
	@JoinColumn(name = "assetId")
	private AssetEntity asset;
	
	@MetaData(value = "本月读数",comments="" )
	@Column(nullable = true)
	private Double thisMonth;
	
	@MetaData(value = "实际数量",comments="" )
	@Column(nullable = true)
	private Double actual;
	
	@MetaData(value = "分摊数量",comments="" )
	@Column(nullable = true)
	private Double share;
	
	@MetaData(value = "计费用量",comments="" )
	@Column(nullable = true)
	private Double chargeAmount;
	
	@MetaData(value = "计划内单价",comments="" )
	@Column(nullable = true)
	private Double planUnitPrice;
	
	@MetaData(value = "金额",comments="" )
	@Column(nullable = true)
	private Double price;
	
	@MetaData(value = "备注",comments="" )
	@Column(nullable = true)
	private String remark;
	
	@MetaData(value = "收费类型",comments="",enumType="stwy_waterType" )
	@Column(nullable = true)
	private String type;
	
	public String getYearMonth() {
		return yearMonth;
	}
	public void setYearMonth(String yearMonth) {
		this.yearMonth = yearMonth;
	}
	public CustomEntity getCustom() {
		return custom;
	}
	public void setCustom(CustomEntity custom) {
		this.custom = custom;
	}
	public AssetEntity getAsset() {
		return asset;
	}
	public void setAsset(AssetEntity asset) {
		this.asset = asset;
	}
	
	public Double getThisMonth() {
		return thisMonth;
	}
	public void setThisMonth(Double thisMonth) {
		this.thisMonth = thisMonth;
	}
	public Double getActual() {
		return actual;
	}
	public void setActual(Double actual) {
		this.actual = actual;
	}
	public Double getShare() {
		return share;
	}
	public void setShare(Double share) {
		this.share = share;
	}
	public Double getChargeAmount() {
		return chargeAmount;
	}
	public void setChargeAmount(Double chargeAmount) {
		this.chargeAmount = chargeAmount;
	}
	/**
	 * 计划内单价
	 */
	public Double getPlanUnitPrice(){
		return this.planUnitPrice;
	}
	public void setPlanUnitPrice(Double planUnitPrice){
		this.planUnitPrice = planUnitPrice;
	}
	/**
	 * 金额
	 */
	public Double getPrice(){
		return this.price;
	}
	public void setPrice(Double price){
		this.price = price;
	}
	/**
	 * 备注
	 */
	public String getRemark(){
		return this.remark;
	}
	public void setRemark(String remark){
		this.remark = remark;
	}
	/**
	 * 收费类型
	 */
	public String getType(){
		return this.type;
	}
	public void setType(String type){
		this.type = type;
	}
	
}
